<?php
/**
 * User: mt
 * Date: 2018/5/5 0005
 */
//1.定义常量
//2.加载类
//3.启动程序
/*
 * 1.定义常量
 * */
//路径
define('ROOT',dirname(__FILE__));
define('APP',ROOT.'/app');
define('CORE',ROOT.'/core');
define('MODULE','app');
define('DRIVE',CORE.'/lib/drive');
//debug
define('APP_DEBUG',true);
//加载composer扩展类
include "vendor/autoload.php";
if(APP_DEBUG){
    $whoops = new \Whoops\Run();
    $errorTitle = "框架出错了";
    $option = new \Whoops\Handler\PrettyPageHandler();
    $option->setPageTitle($errorTitle);
    $whoops->pushHandler($option);
    $whoops->register();
    ini_set('display_errors','On');
}else{
    ini_set('display_errors','Off');
}
/*
 * 2.加载类
 * */
include(CORE.'/common/function.php');
include(CORE.'/core.php');
//自动加载类
spl_autoload_register('\core\core::load');
/*
 * 3.运行程序
 * */

\core\core::run();